package ${basePackage}.maker.cli;

import java.util.concurrent.Callable;

import ${basePackage}.maker.cli.command.ConfigCommand;
import ${basePackage}.maker.cli.command.GenerateCommand;
import ${basePackage}.maker.cli.command.ListCommand;

import picocli.CommandLine;

/**
 * @author ${auhtor}
 */
@CommandLine.Command(name = "${auhtor}", version = "${version}", mixinStandardHelpOptions = true)
public class CommandExecutor implements Callable<Integer> {

    private final CommandLine commandLine;

    {
        commandLine = new CommandLine(this)
                .addSubcommand("generate", new GenerateCommand())
                .addSubcommand("list", new ListCommand())
                .addSubcommand("config", new ConfigCommand());
    }

    @Override
    public Integer call() throws Exception {
        return 0;
    }

    public Integer doExecutor(String[] args) {
        return commandLine.execute(args);
    }
}
